
/* 
Placebo regressions
*/

***********
*** IV ****
***********


estimates clear
clear

use ".\Dropbox\Vaccination\dma_sample.dta" // load the data

gen x=(statefips==48|statefips==15)  // identify states without the vaccination data

bysort google_dma: egen drop=max(x)
drop if drop==1 // drop DMAs crossing states without the vaccination data
drop if rep_house2016 ==. // drop DMAs without the house election data for consistency

zscore(flu rep*2016 vacc* america) // normalize the variables

local DMA "lat lon temp rain income native_share white_share col_share elder_share male_share  mfg_share_diff popden" // county characteristics

label variable z_rep_pres2016 "Trump vote share, 2016"


ivreg2 z_flu (z_rep_pres2016=z_america2014) i.division, robust 
estimates store iv1

ivreg2 z_flu (z_rep_pres2016=z_america2014)  `DMA' i.division, robust 
estimates store iv2

ivreg2 z_vaccinated_18pluspop_ratio (z_rep_pres2016=z_america2014) i.division, robust 
estimates store iv3

ivreg2 z_vaccinated_18pluspop_ratio (z_rep_pres2016=z_america2014) `DMA' i.division, robust 
estimates store iv4


estout iv* using ".\Dropbox\Vaccination\Draft\tab_placebo_iv.tex",  replace style(tex) cells(b(fmt(3) star) se(par fmt(3))) stats(widstat N, fmt(2 0) labels("F-stat" "Observations")) keep(z_rep_pres2016) label mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01)